package com.xuanwei.core.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xuanwei.core.enums.OrderStatus;
import com.xuanwei.core.enums.RefundStatus;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Author jiangyong
 * @Description TODO
 * @Date 2019/7/17 11:29
 **/
@Data
public class OrderListVo {

    private Integer id;

    private String orderNo;

    private String refundNo;

    private String nickname;

    private BigDecimal actualAmount;

    private String productName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    private Integer status;

    private Integer refundStatus;

    private String receiveName;

    private String receivePhone;

    private String statusMsg;

    public String getRefundStatusMsg() {

        return RefundStatus.getMessage(refundStatus);

    }


    public String getStatusMsg() {

        return OrderStatus.getMessage(status);

    }

}
